﻿ #ifndef EVALUATIONREPORT_H
#define EVALUATIONREPORT_H

#include <QWidget>
#include "userDataFormate.h"
#include "newuser.h"
#include <QtCharts>
namespace Ui {
class evaluationReport;
}

class evaluationReport : public QWidget
{
    Q_OBJECT

public:
    explicit evaluationReport(QWidget *parent = nullptr);
    ~evaluationReport();

    //type 1-生成报告  2-查看报告
    void  setReportData(const ST_EvaluateReport&,int type,QList<QPointF> &pointList);
    ST_EvaluateReport getReportDataByStartTime(QString reportDateStr);
    bool deleteReportByStartTime(QString startTimeStr);
protected:
    virtual void changeEvent(QEvent* event);
private:
    //绘制角度曲线图的函数(从数据库中获取)
    void evaluateAngleChart(const QList<QPointF> &pointList);

protected:
    void paintEvent(QPaintEvent *event);
private slots:
    void on_noSave_pushButton_clicked();

    void on_save_pushButton_clicked();
    void on_confirm_pushButton_clicked();

private:
    Ui::evaluationReport *ui;
    ST_EvaluateReport m_st_evaluatereport;

    QValueAxis *m_axisX;
    QValueAxis *m_axisY;
    QList<QPoint> m_listpoint;
    int m_currentUserId;        //当前用户ID
    newUser m_newUser;  //选择用户
    ST_EvaluateData st_evaluateData;
    QChart *m_chart;
    QChartView *m_chartview;

};

#endif // EVALUATIONREPORT_H
